package cn.icybear.orzjisp;

import java.util.Arrays;

public class Expression implements Value {
	public Expression next;
	public Command op;
	public Value[] vals;
	public int line;
	public Expression() {
	}

	public Expression(Command op) {
		this.op = op;
	}

	public Expression(Command op, Value... vals) {
		this(op);
		this.vals = vals;
	}

	public Expression(Command op, Expression next, Value... vals) {
		this(op, vals);
		this.next = next;
	}

	@Override
	public Object getValue() {
		return this;
	}

	@Override
	public String toString() {
		return "[Expression:op=" + op + ";vals=" + Arrays.toString(vals) + "]";
	}
}
